package com.dsa.team5.kanban.service.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.dsa.team5.kanban.dao.StatusDao;
import com.dsa.team5.kanban.model.Status;
import com.dsa.team5.kanban.service.StatusService;
import com.dsa.team5.kanban.utils.CustomHibernateDaoSupport;

@Repository
public class StatusServiceImpl extends CustomHibernateDaoSupport implements
		StatusService {

	@Autowired
	SessionFactory sessionFactory;

	@Autowired
	StatusDao statusDao;

	@Override
	public void save(Status status) {
		statusDao.save(status);
	}

	@Override
	public void update(Status status) {
		statusDao.update(status);
	}

	@Override
	public void delete(Status status) {
		statusDao.delete(status);
	}
	
	@Override
	public Status getStatus(Long id) {
		return statusDao.getStatus(id);
	}


	@Override
	public List<Status> getStatusByKanbanId(Long kanbanId) {
		return statusDao.getStatusByKanbanId(kanbanId);
	}
}
